
<template>
  <div id="QualityManagementHome" class="p-box">
    <div class="p-header shadow">
      <WeatherModule></WeatherModule>
      <div class="entry-list">
        <div class="entry-item" v-for="(item) in entryList" :key="item.id" @click="skipPage(item)">
          <img :src="item.src" alt />
          <span>{{item.name}}</span>
        </div>
      </div>
    </div>
    <div class="p-content">
      <div class="m-box" v-for="(menu) in menuList" :key="menu.id">
        <div class="m-title">{{menu.moduleName}}</div>
        <div class="m-content">
          <div class="menu-list">
            <div
              class="menu-item"
              v-for="(mod) in menu.moduleList"
              :key="mod.id"
              @click="skipPage(mod)"
            >
              <img :src="mod.src" alt :class="mod.imgClass?mod.imgClass:''" />
              <span>{{mod.name}}</span>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import WeatherModule from "@/weather/WeatherModule";
export default {
  name: "QualityManagementHome",
  components: {
    WeatherModule
  },
  data() {
    return {
      entryList: [
        {
          id: "e1",
          name: "预警信息",
          src: require("#/assets/img/menu/warningMessage.png"),
          path: "WarningMessage"
        },
        {
          id: "e2",
          name: "待办任务",
          src: require("#/assets/img/menu/taskToDo.png"),
          path: "TaskToDo"
        },
        {
          id: "e3",
          name: "抄送我的",
          src: require("#/assets/img/menu/copyMe.png"),
          path: "CopyMe"
        }
      ],
      menuList: [
        {
          id: "1",
          moduleName: "质量管理工作流",
          moduleList: [
            {
              id: "1-1",
              name: "协同检查",
              src: require("#/assets/img/menu/teamWorkCheck.png"),
              path: "TeamWorkCheck"
            },
            {
              id: "1-2",
              name: "质量工匠之星",
              imgClass: "specialImg",
              src: require("#/assets/img/menu/craftsmanStar.png"),
              path: "CraftsmanStar"
            },
            {
              id: "1-3",
              name: "实测实量",
              src: require("#/assets/img/menu/realMeasure.png"),
              path: "RealMeasure"
            }
          ]
        },
        {
          id: "2",
          moduleName: "质量管理交底",
          moduleList: [
            {
              id: "2-1",
              name: "专项会议",
              src: require("#/assets/img/menu/meetings.png"),
              path: ""
            },
            {
              id: "2-2",
              name: "数字样板查询",
              src: require("#/assets/img/menu/numberSearch.png"),
              path: ""
            },
            {
              id: "2-3",
              name: "优秀做法展示",
              src: require("#/assets/img/menu/good.png"),
              path: ""
            },
            {
              id: "2-4",
              name: "典型案例共享",
              src: require("#/assets/img/menu/case.png"),
              path: ""
            },
            {
              id: "2-5",
              name: "项目质量策划",
              src: require("#/assets/img/menu/cehua.png"),
              path: ""
            },
            {
              id: "2-6",
              name: "国家政策法规",
              src: require("#/assets/img/menu/policy.png"),
              path: ""
            }
          ]
        },
        {
          id: "3",
          moduleName: "质量管理查询",
          moduleList: [
            {
              id: "3-1",
              name: "现行规范库",
              src: require("#/assets/img/menu/guifan.png"),
              path: ""
            },
            {
              id: "3-2",
              name: "工艺做法库",
              src: require("#/assets/img/menu/art.png"),
              path: ""
            }
          ]
        }
      ]
    };
  },
  computed: {},
  created() {},
  mounted() {},
  watch: {},
  methods: {
    skipPage(item) {
      this.$router.push({
        name: item.path
      });
    }
  },
  destroyed() {}
};
</script>

<style lang="scss">
#QualityManagementHome {
}
</style>
